# Maintainer: Alexandre Ferreira < alex.jorge.m [at] gmail.com >

_realname=jinja
pkgbase=python-${_realname}
pkgname=("python-${_realname}")
pkgver=2.11.2
pkgrel=1
pkgdesc='A simple pythonic template language written in Python'
arch=('i686' 'x86_64')
license=('BSD')
url='http://jinja.pocoo.org/'
depends=('python-setuptools' 'python-markupsafe')
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/pallets/jinja/archive/${pkgver}.tar.gz")
sha256sums=('c5720a681bf1c5b11e184af32e6a8ce28670911787702b20cd0367e3877bbcae')

prepare() {
  cd "${srcdir}"
  rm -rf python-build-${CARCH} | true
  cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
}

build() {
  msg "Python build for ${CARCH}"
  cd "${srcdir}/python-build-${CARCH}"
  /usr/bin/python setup.py build
}

package() {
  cd "${srcdir}/python-build-${CARCH}"
  /usr/bin/python setup.py install --root="${pkgdir}" -O1
  install -Dm644 LICENSE.rst "${pkgdir}/usr/share/licenses/python-${_realname}/LICENSE.rst"
}
